From: Dan Winship Date: Tue, 5 Apr 2011 14:55:27 +0000 (-0400) Subject: StImText: remove two references to old clutter bugs X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~8229 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c5ca4e3ff014bd75b8a285041366d4ef4f48a827;p=gnome-shell.git StImText: remove two references to old clutter bugs Remove a workaround for clutter_actor_get_transformed_position() not working inside paint(), and remove a comment about ClutterText::position not being properly notified, since it is now. (However, it doesn't seem worth it to rewrite the code to use notification, since that would actually end up being more complicated than the current solution.) https://bugzilla.gnome.org/show_bug.cgi?id=648758 --- diff --git a/src/st/st-im-text.c b/src/st/st-im-text.c index c2a0bf55a..92574ff67 100644 --- a/src/st/st-im-text.c +++ b/src/st/st-im-text.c @@ -103,7 +103,6 @@ update_im_cursor_location (StIMText *self) { StIMTextPrivate *priv = self->priv; ClutterText *clutter_text = CLUTTER_TEXT (self); - ClutterActor *parent; gint position; gfloat cursor_x, cursor_y, cursor_height; gfloat actor_x, actor_y; @@ -113,25 +112,7 @@ update_im_cursor_location (StIMText *self) clutter_text_position_to_coords (clutter_text, position, &cursor_x, &cursor_y, &cursor_height); - /* This is a workaround for a bug in Clutter where - * clutter_actor_get_transformed_position doesn't work during - * clutter_actor_paint() because the actor has already set up - * a model-view matrix. - * - * http://bugzilla.openedhand.com/show_bug.cgi?id=1115 - */ - actor_x = actor_y = 0.; - parent = CLUTTER_ACTOR (self); - while (parent) - { - gfloat x, y; - - clutter_actor_get_position (parent, &x, &y); - actor_x += x; - actor_y += y; - - parent = clutter_actor_get_parent (parent); - } + clutter_actor_get_transformed_position (CLUTTER_ACTOR (self), &actor_x, &actor_y); area.x = (int)(0.5 + cursor_x + actor_x); area.y = (int)(0.5 + cursor_y + actor_y); @@ -355,14 +336,6 @@ st_im_text_key_press_event (ClutterActor *actor, gdk_event_free ((GdkEvent *)event_gdk); } - /* ClutterText:position isn't properly notified, so we have to - * check before/after to catch a keypress (like an arrow key) - * moving the cursor position, which should reset the IM context. - * (Resetting on notify::position would require a sentinel when - * committing text) - * - * http://bugzilla.openedhand.com/show_bug.cgi?id=1830 - */ old_position = clutter_text_get_cursor_position (clutter_text); if (!result &&